﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAL
{
    public static class GetParameter
    {
        #region Get Parameters
        
        static testdbsEntities ctx = new testdbsEntities();

        public static List<Parameters> GetParameters()
        {
            
                IQueryable<Parameters> tParValue = from cs in ctx.Parameters
                                                   select cs;
                return tParValue.ToList();
        }

        public static List<Parameters> GetParameters(Parameters mParam)
        {
            
                IQueryable<Parameters> tParValue = from cs in ctx.Parameters
                                                   where cs == mParam
                                                   select cs;
                return tParValue.ToList();
        }

        public static List<Parameters> GetParametersByName(string mName)
        {
                IQueryable<Parameters> tParValue = from cs in ctx.Parameters
                                                   where cs.name == mName
                                                   select cs;
                return tParValue.ToList();
        }

        public static List<Parameters> GetParametersByClass(string mClass)
        {
            
                        IQueryable<Parameters> tParValue = from cs in ctx.Parameters
                                                   where cs.@class == mClass
                                                   select cs;
                return tParValue.ToList();
        }

        public static List<Parameters> GetParametersByType(string mType)
        {
            
                IQueryable<Parameters> tParValue = from cs in ctx.Parameters
                                                   where cs.type == mType
                                                   select cs;
                return tParValue.ToList();
        }



        #endregion
    }
}
